﻿<%@page contentType="text/vnd.wap.wml; charset=utf-8"%>
<%@ page import="java.io.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*"%>
<%@ page import="common.*"%>
<%@ page import="wapbean.*"%>

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org//DTD//wml_1.1.xml">
<wml>
<%
	String purl=null;  
	ContentFactory Fac = new ContentFactory(); 

	Vector ver = new Vector();
	Vector vc = Fac.getMobilemodelBean();
	boolean find = false;
	if (vc != null && !vc.isEmpty()) {
		int n = vc.size();
		//System.out.println("nnnnnn=" + n);
		for (int j = 1; j < n; j++) {
		purl = (String) session.getAttribute("p");
			MobilemodelBean ab = (MobilemodelBean) vc.elementAt(j);
			String description = ab.getDescription();
		//	System.out.println("description=" + description);
			String[] p = description.split(";");
		//	System.out.println("pppppp=" + p);
			for (int k = 0; k < p.length; k++) {
		//		System.out.println("kkkkkkkkk=" + p[k]);
		
		//		System.out.println("kkkpurl---------="
		//				+ purl.equals(p[k]));
		
				if (purl.equals(p[k])) {
					//System.out.println("kkkpurlkkkkkk="+purl);  
					ver = Fac.getWapModel1(purl);
					find = true;
					purl=p[k];
			//		System.out.println("purlpurlpurlpurlpurlpurlpurlpurlpurlpurl=" + p[k]);  
					break;
				}
			}
			if(find){
			 	break;	
			}
		}
			if(!find){
			ver = Fac.getWapModel1("bbki8");  
			purl="bbki8";
		//	System.out.println("pgggggggggggggggggggggggggggggggggggg=" + find); 
			} 
	}

	// ver = Fac.getWapModel1(purl);
	WapcategoryFactory Fac1 = new WapcategoryFactory();
%>
<card id="card1" title="乐游-手机游戏下载">
<p align="left">

 <img src="/game3.0/img/logo.png" />
	<br /> <%
 		if (ver != null && !ver.isEmpty()) {  
 		int m = ver.size();
 		for (int i = 0; i < m; i++) {
 			Allbean bea = (Allbean) ver.elementAt(i);
 			String CategoryID = bea.getCategoryID();
 			String MobileModelID = bea.getMobileModelID();
 			String ProviderID = bea.getProviderID();
 			//  System.out.println("CategoryID==="+CategoryID); 
 			//  System.out.println("MobileModelID==="+MobileModelID);     
 			//  System.out.println("ProviderID==="+ProviderID);
 %> <%
 if (bea.getCategoryTypeID().equals("12")) {
 %> <a
	href="/game3.0/wappages/gameList.jsp?CategoryID=<%=bea.getCategoryID()%>&amp;MobileModelID=<%=bea.getMobileModelID()%>&amp;ProviderID=<%=bea.getProviderID()%>&amp;purl=<%=purl%>">
		<%
		out.println(bea.getTitle());
		%> </a> <%
 } else if (bea.getCategoryTypeID().equals("5")) {
 %> <a
	href="<%=bea.getActionPage()%>"> <%
 out.println(bea.getTitle());
 %> </a> <%
 		}
 		 else if(bea.getCategoryTypeID().equals("2")){
 		       Vector ver5 = Fac1.getWapcategoryMobilemodel1(CategoryID, purl);
		            if(ver5!=null){
                    int g=ver5.size(); 
              
                    for(int s=0;s<g;s++){
                    Allbean bea5=(Allbean)ver5.elementAt(s);  
                    %>
                     <a href="/game3.0/wappages/gameList.jsp?CategoryID=<%=bea5.getCategoryID()%>&amp;MobileModelID=<%=bea5.getMobileModelID()%>&amp;ProviderID=<%=bea5.getProviderID()%>&amp;purl=<%=purl%>">|
		★<%
 out.println(bea5.getTitle());
 %> </a> 
                    <%
                   // if(s==ver5.size()-1){
                   //  out.println("<br/>");    
                   //  }
                     }}
		 }
		  else {
 		out.println(bea.getTitle());  
 			}
 %> <br /> 
                    <%            
	                 Vector ver4;
   	               if(bea.getCategoryTypeID().equals("1")){
					ver4 = Fac1.getMobilemodelContent1(CategoryID, purl);
   	                if(ver4!=null){
                    int a=ver4.size(); 
              
                    for(int t=0;t<a;t++){
                    Allbean bea4=(Allbean)ver4.elementAt(t);
                   
            	 %> 
 
		 ★<a href="/game3.0/wappages/contentgameview.jsp?CategoryID=<%=bea4.getCategoryID()%>&amp;MobileModelID=<%=bea4.getMobileModelID()%>&amp;ProviderID=<%=bea4.getProviderID()%>&amp;contentId=<%=bea4.getContentId()%>&amp;gamename=<%=bea4.getTitle()%>&amp;purl=<%=purl%>&amp;ContentResourceID=<%=bea4.getContentResourceID()%>"><%
 out.println(bea4.getTitle());
 %>
</a> <br />
		 <%}}}
	}}%>      
	
	【<a href="wappages/help.jsp">客服咨询</a>】
	<br />
	wap.leyoou.cn
	
  
	</p>
</card>
</wml>